#include<iostream>
#include<conio.h>
#include<math.h>
using namespace std;
class hinhvuong
{
private:
	int x,y;
public:
	void nhap(int a,int b);
	void in();
	void tich();
	void sosanh(hinhvuong);
};
void hinhvuong::nhap(int a,int b)
{
	x=a;y=b;
}
void hinhvuong::in()
{
	cout<<"\nCac so vua moi nhap la, ["<<x<<", "<<y<<" ] ";
}
void hinhvuong::tich()
{
	cout<<"\nTich hai so la = "<<x*y;
}
void hinhvuong::sosanh(hinhvuong hv1)
{
	int d,x1=hv1.x,y1=hv1.y;
	if(x1>x)
		cout<<"\nHoanh do diem sau bu hon diem truoc";
	if(x1<x)
		cout<<"\nHoanh do diem sau be hon diem truoc";
	if(y1>y)
    cout<<"\nTung do diem sau bu hon diem truoc ";
	if(y1<y)
		cout<<"\nTung do diem sau be hon diem truoc";
}
void main()
{   int x,y,x1,y1;
	hinhvuong hv,hv1;
	cout<<"\nNhap cap so mot = ";
	cin>>x>>y;
	cout<<"\nNhap cap so hai = ";
	cin>>x1>>y1;
	hv.nhap(x,y);
	hv.in();
	hv.tich();
	hv1.nhap(x1,y1);
	hv1.in();
	hv1.tich();
	hv.sosanh(hv1);
	getch();
}